package com.xcx.utils;

import java.util.Calendar;
import java.util.Date;
import java.util.Random;

public class XcxUtil {

    public static Date get30MinLater(){
        Calendar now=Calendar.getInstance();
        now.add(Calendar.MINUTE,30);
        return now.getTime();
    }

    public static String get6Str(){
        String sources = "0123456789"; // 加上一些字母，就可以生成pc站的验证码了
        Random rand = new Random();
        StringBuffer flag = new StringBuffer();
        for (int j = 0; j < 6; j++)
        {
            flag.append(sources.charAt(rand.nextInt(9)) + "");
        }
        return flag.toString();
    }

}
